package com.emergency.examine.domain;

import com.emergency.base.domain.BaseEntity;

import javax.persistence.*;

//考生题目得分表
@Entity
@Table(name = "ex_question_score")
public class QuestionScore extends BaseEntity {

    @OneToOne(targetEntity = ExamStaff.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "staff_id", referencedColumnName = "id")
    private ExamStaff examStaff; //考生id(考生表，examstaff)

    @OneToOne(targetEntity = Question.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "question_id", referencedColumnName = "id")
    private Question question; //题目id 题目表，question

    @OneToOne(targetEntity = Exam.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "exam_id", referencedColumnName = "id")
    private Exam exam;

    private double score;//考生题目得分

    public ExamStaff getExamStaff() {
        return examStaff;
    }

    public void setExamStaff(ExamStaff examStaff) {
        this.examStaff = examStaff;
    }

    public Question getQuestion() {
        return question;
    }

    public void setQuestion(Question question) {
        this.question = question;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public Exam getExam() {
        return exam;
    }

    public void setExam(Exam exam) {
        this.exam = exam;
    }
}
